package com.sinosoft.ebusiness.domain.elementManage;
// 采用工具 Hibernate Tools 3.2.4.GA (sinosoft version) 生成，请勿手工修改。

import java.util.ArrayList;
import java.util.List;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sinosoft.ebusiness.domain.elementManage.GePageViewgroup;
import com.sinosoft.ebusiness.domain.elementManage.GeProductPageViewItem;
import com.sinosoft.ebusiness.domain.elementManage.GeTemplate;
import com.sinosoft.ebusiness.domain.elementManage.GeTemplateGroupId;

/**
 * POJO类GeTemplateGroup
 */
@Entity
@Table(name = "GE_TEMPLATE_GROUP")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class GeTemplateGroup implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3643203500451857144L;

	/** 属性ID */
	private GeTemplateGroupId id;

	/** 属性gePageViewgroup */
	private GePageViewgroup gePageViewgroup;

	/** 属性geTemplate */
	private GeTemplate geTemplate;

	/** 属性more */
	private String more;

	/** 属性显示顺序序号 */
	private Long orderNo;
	
	
	/** 属性显示顺序序号 */
	private String funBody;
		
	
	/** 属性geTemplateGroups */
	private List<GeProductPageViewItem> geProductPageViewItems = new ArrayList<GeProductPageViewItem>(
			0);

	/**
	 * 类GeTemplateGroup的默认构造方法
	 */
	public GeTemplateGroup() {
	}

	/**
	 * 属性ID的getter方法
	 */
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "groupcode", column = @Column(name = "GROUPCODE")),
			@AttributeOverride(name = "templatecode", column = @Column(name = "TEMPLATECODE")) })
	public GeTemplateGroupId getId() {
		return this.id;
	}

	/**
	 * 属性ID的setter方法
	 */
	public void setId(GeTemplateGroupId id) {
		this.id = id;
	}

	/**
	 * 属性gePageViewgroup的getter方法
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GROUPCODE", nullable = false, insertable = false, updatable = false)
	@JsonBackReference //防止关系对象的递归访问
	public GePageViewgroup getGePageViewgroup() {
		return this.gePageViewgroup;
	}

	/**
	 * 属性gePageViewgroup的setter方法
	 */
	public void setGePageViewgroup(GePageViewgroup gePageViewgroup) {
		this.gePageViewgroup = gePageViewgroup;
	}

	/**
	 * 属性geTemplate的getter方法
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TEMPLATECODE", nullable = false, insertable = false, updatable = false)
	@JsonBackReference //防止关系对象的递归访问
	@JSONField(serialize=false)
	public GeTemplate getGeTemplate() {
		return this.geTemplate;
	}

	/**
	 * 属性geTemplate的setter方法
	 */
	public void setGeTemplate(GeTemplate geTemplate) {
		this.geTemplate = geTemplate;
	}

	/**
	 * 属性more的getter方法
	 */

	@Column(name = "MORE")
	public String getMore() {
		return this.more;
	}

	/**
	 * 属性more的setter方法
	 */
	public void setMore(String more) {
		this.more = more;
	}

	/**
	 * 属性显示顺序序号的getter方法
	 */

	@Column(name = "ORDERNO")
	public Long getOrderNo() {
		return this.orderNo;
	}

	/**
	 * 属性显示顺序序号的setter方法
	 */
	public void setOrderNo(Long orderNo) {
		this.orderNo = orderNo;
	}
	

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "geTemplateGroup")
	public List<GeProductPageViewItem> getGeProductPageViewItems() {
		return geProductPageViewItems;
	}

	public void setGeProductPageViewItems(
			List<GeProductPageViewItem> geProductPageViewItems) {
		this.geProductPageViewItems = geProductPageViewItems;
	}
	
	@Column(name = "FUNBODY")
	public String getFunBody() {
		return funBody;
	}

	public void setFunBody(String funBody) {
		this.funBody = funBody;
	}
	
	

}
